home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / WIN_VB / NONSIZE.ZIP;1 / MODULE1.BAS < prev    next >
Encoding:
BASIC Source File  |  1993-12-27  |  1.7 KB  |  43 lines

  1. Option Explicit
  2.  
  3. ' ---------------------------
  4. ' SubEZ function declarations
  5. ' ---------------------------
  6. ' LoWord extracts low integer from long lParam in message
  7. ' capture. HiWord extracts high integer. MakeLong makes
  8. ' long value by concatenating two integers. This stuff is
  9. ' easy enough to do w/o calls to functions, but used
  10. ' because it's there.
  11. Declare Function LoWord Lib "SUBEZD.VBX" (ByVal dWord As Long) As Integer
  12. Declare Function HiWord Lib "SUBEZD.VBX" (ByVal dWord As Long) As Integer
  13. Declare Function MakeLong Lib "SUBEZD.VBX" (ByVal LoWord As Integer, ByVal HiWord As Integer) As Long
  14.  
  15. ' ---------------------------------------------
  16. ' Windows API system menu function declarations
  17. ' ---------------------------------------------
  18. Declare Function GetSystemMenu Lib "User" (ByVal hWnd As Integer, ByVal bRevert As Integer) As Integer
  19. Declare Function RemoveMenu Lib "User" (ByVal hMenu As Integer, ByVal nPosition As Integer, ByVal wFlags As Integer) As Integer
  20.  
  21. ' -----------------------------
  22. ' Windows API message constants
  23. ' -----------------------------
  24. Global Const WM_SETCURSOR = &H20    ' cursor movement message
  25. Global Const WM_LBUTTONDOWN = &H201 ' left button message
  26. Global Const HTCLIENT = 1           ' hit-code: form
  27. Global Const HTLEFT = 10            ' hit-code: left border
  28. Global Const HTBOTTOMRIGHT = 17     ' hit code: bottom right border
  29.  
  30. Sub NoSizeMenu (FormToDo As Integer)
  31.  
  32.    Dim hSysMenu As Integer
  33.    Dim discard As Integer
  34.  
  35.    ' make editable copy of system menu
  36.    hSysMenu = GetSystemMenu(FormToDo, False)
  37.  
  38.    ' delete Size command from system menu
  39.    discard = RemoveMenu(hSysMenu, 2, &H400)
  40.  
  41. End Sub
  42.  
  43.